package com.bifang.module.file.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 文件应用分类授权表
 *
 * @author shun
 * @since 2023-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("file_app_class")
@Schema(name = "FileAppClass", title = "文件应用分类授权表", description = "文件应用分类授权表实体类")
public class FileAppClass extends Model<FileAppClass> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "APP_CLASS_ID", type = IdType.ASSIGN_ID)
    private Long appClassId;

    @Schema(name = "appId", title = "应用id")
    @TableField(value = "APP_ID")
    private Long appId;

    @Schema(name = "fileClassCode", title = "文件分类编号")
    @TableField(value = "FILE_CLASS_CODE")
    private String fileClassCode;

    @Schema(name = "fileClassPath", title = "文件存放基础路径")
    @TableField(value = "FILE_CLASS_PATH")
    private String fileClassPath;

    @Schema(name = "expireTime", title = "过期时间，单位秒")
    @TableField(value = "EXPIRE_TIME")
    private Date expireTime;

    @Schema(name = "authStatus", title = "审核状态 0未审核，1审核通过，2审核不通过")
    @TableField(value = "AUTH_STATUS")
    private String authStatus;

    @Schema(title = "审核人")
    @TableField("AUDIT_NAME")
    private String auditName;

    @Schema(title = "审核意见")
    @TableField("AUDIT_OPINION")
    private String auditOpinion;

    @Schema(name = "auditTime", title = "审核时间")
    @TableField(value = "AUDIT_TIME")
    private Date auditTime;

    @Override
    public Serializable pkVal() {
        return this.appClassId;
    }
}
